package com.jader.activities;
/*商品放大图片*/
import com.jader.fragment.Goods_PictrueFragment;
import com.lesogo.cu.custom.ScaleView.HackyViewPager;
import com.zlp.jader.R;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

public class ShowGoodsBigPictrue extends FragmentActivity {

	private HackyViewPager viewPager;
	private String picture;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.goods_show_big_pictrue_a);
		Intent intent = getIntent();
		picture = intent.getStringExtra("picture");
		initViewPager();
	}


	private void initViewPager() {

		viewPager = (HackyViewPager) findViewById(R.id.goods_viewPager_show_bigPic);
		ViewPagerAdapter adapter = new ViewPagerAdapter(
				getSupportFragmentManager());
		viewPager.setAdapter(adapter);

	}

	private class ViewPagerAdapter extends FragmentStatePagerAdapter {

		public ViewPagerAdapter(FragmentManager fm) {
			super(fm);
		}

		@Override
		public Fragment getItem(int position) {
			return new Goods_PictrueFragment(picture);
		}

		@Override
		public int getCount() {
			return 1;
		}

	}

}
